package com.dongdong.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdong.mapper.TbCitiesMapper;
import com.dongdong.pojo.TbCities;
import com.dongdong.pojo.TbCitiesExample;
import com.dongdong.service.CitiesService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Deacription TODO
 * @Author Lenovo
 * @Date 2020/12/22 17:06
 * @Version 1.0
 **/
@Service
@Component
public class CitiesServiceImpl implements CitiesService {

    @Resource
    private TbCitiesMapper tbCitiesMapper;

    @Override
    public List<TbCities> getCity(String provinceid) {
        TbCitiesExample example = new TbCitiesExample();
        TbCitiesExample.Criteria criteria = example.createCriteria();
        criteria.andProvinceidEqualTo(provinceid);
        return tbCitiesMapper.selectByExample(example);
    }
}

